import { createRouter, createWebHistory } from 'vue-router'
import Skip from '../views/Skip.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  linkActiveClass: 'my-active', // 路由激活时添加的类名
  linkExactActiveClass: 'my-active', // 链接被精确匹配激活时添加的类名
  routes: [
    {
      path: "/",
      redirect: { name: "Skip" }
    },
    {
      path: '/Skip',
      name: 'Skip',
      component: Skip
    },
    {
      path: '/demo',
      name: 'demo',
      component: () => import('../components/demo.vue')
    },
    {
      path: '/enterGarden',
      name: 'enterGarden',
      component: () => import('../views/enterGarden.vue')
    },
    {
      path: '/enterGarden/details',
      name: 'enterGardenDetails',
      component: () => import('../views/enterGardenDetails.vue')
    },
    {
      path: '/article',
      name: 'article',
      component: () => import('../views/article.vue')
    },
    {
      path: '/appointment',
      name: 'appointment',
      component: () => import('../views/appointment.vue')
    },
    {
      path: '/map',
      name: 'map',
      component: () => import('../views/map.vue')
    },
    {
      path: '/species',
      name: 'species',
      component: () => import('../views/species.vue')
    },
  ]
})

export default router
